﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UI.Comm.Controls;
using UI.Comm.Common;
using PersonalHealth.Data.Model;
using Health_Solution.Views;

namespace Health_Solution
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : PMWindow
    {
        private Window child;
        public Window Child
        {
            set
            {
                if (this.child != null)
                    this.child.Close();
                this.child = value;
            }
        }
        public MainWindow()
        {
            InitializeComponent();

            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }

        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            this.ContentFrame.Content = new Login();
        }

        protected override void  OnClosed(EventArgs e)
        {
            if (child != null)
                child.Close();

            base.OnClosed(e);
        }


    }
}
